package com.baizhi.mapimpl;

import java.io.FileInputStream;
import java.io.IOException;
import java.util.Properties;

public class PropertriesDemo2 {
    public static void main(String[] args) throws IOException {
        Properties pro = new Properties();
        //加载jdbc.properties文件
        pro.load(new FileInputStream("javase_map\\jdbc.properties"));

        String driver = pro.getProperty("jdbc.driver");
        String url = pro.getProperty("jdbc.url");
        String username = pro.getProperty("jdbc.username");
        String password = pro.getProperty("jdbc.password");

        System.out.println(driver);
        System.out.println(url);
        System.out.println(username);
        System.out.println(password);

    }
}
